]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: unset this._clickedSummaryItem if we are hiding the summary box pointer...
authorMarina Zhurakhinskaya <marinaz@redhat.com>
Fri, 23 Sep 2011 03:37:11 +0000 (23:37 -0400)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Mon, 26 Sep 2011 17:30:46 +0000 (13:30 -0400)
This ensures that this._clickedSummaryItem is always unset correctly.

Because we disconnect the signals that have _adjustSummaryBoxPointerPosition()
as a callback when unsetting this._clickedSummaryItem, we no longer call
setPosition() on this._summaryBoxPointer after it is hidden. Calling
setPosition() shows the box pointer again, which previously resulted in
an empty box pointer staying behind when a notification associated with
a tray icon was clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=659862

js/ui/messageTray.js

index fcf2f42fcccd72e4e0bfc4c2a4cedaf4fc8b8589..863930b3952b4a1b863bd047fc2c35a4d3dfac0f 100644 (file)
@@ -2349,8 +2349,9 @@ MessageTray.prototype = {
         }
 
         this._summaryBoxPointerState = State.HIDING;
-        // Unset this._clickedSummaryItem if we are no longer showing the summary
-        if (this._summaryState != State.SHOWN)
+        // Unset this._clickedSummaryItem if we are no longer showing the summary or if
+        // this._clickedSummaryItem is still the item associated with the currently showing box pointer
+        if (this._summaryState != State.SHOWN || this._summaryBoxPointerItem == this._clickedSummaryItem)
             this._unsetClickedSummaryItem();
 
         this._focusGrabber.ungrabFocus();